com.supermap.ar.areffect
Class ARParticleElement
- java.lang.Object
-
- com.supermap.ar.areffect.AREffectElement
-
- com.supermap.ar.areffect.ARParticleElement
-
public class ARParticleElement extends AREffectElement
AR special effect object. Particle object model
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.ar.areffect.AREffectElement
AREffectElement.onRenderableLoadCompleteListener, AREffectElement.OnTapListener, AREffectElement.OnTouchListener, AREffectElement.PositionType
-
-
Constructor Summary
Constructors Constructor and Description ARParticleElement(android.content.Context context)
Construction method
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
createDefaultAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Create particle object default animationvoid
createRotatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Creates particle rotation animationvoid
createTranslatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Creates particle placement animationfloat
getDiffusivityX()
Gets the diffusion coefficient of x-axisfloat
getDiffusivityY()
Gets the diffusion coefficient of y-axisfloat
getDiffusivityZ()
Gets the diffusion coefficient of z-axisvoid
init(int count)
Initialize: generating particle collection Generating multiple AR special effect objects.boolean
isGaussian()
Whether the model will use Gaussian distribution to produce new positionboolean
isInitRandomDirection()
The direction of a single particle is random when initializing itboolean
isRandomSize()
Whether the size of the current model is randomvoid
setDiffusivityX(float diffusivityX)
Sets the diffusion coefficient of x-axis Controls the diffusion extent of particle flow.void
setDiffusivityY(float diffusivityY)
Sets the diffusion coefficient of y-axis Controls the diffusion extent of particle flow.void
setDiffusivityZ(float diffusivityZ)
Sets the diffusion coefficient of z-axis Controls the diffusion extent of particle flow.void
setGaussian(boolean isGaussian)
Sets whether to use Gaussian distribution to produce new positionvoid
setInitRandomDirection(boolean isRandomDirection)
Whether the direction of a single particle is random when initializing itvoid
setRandomSize(boolean isRandomSize)
Sets whether you want the size of the current model is random-
Methods inherited from class com.supermap.ar.areffect.AREffectElement
addChild, addChilds, addOnTapListener, addOnTouchListener, clearAllChilds, destroy, getAllChilds, getChild, getChild, getChild, getChildCount, getElementType, getId, getLocalScaleFactor, getOnRenderableLoadCompleteListener, getPosition, getPositionType, getRelativePosition, getRotationAngle, getRotationAxis, getScaleFactor, getWGSCoordinates, isShadowCaster, isShadowReceiver, isTransformable, isVisible, removeChild, removeChild, removeChild, removeChild, removeOnTapListener, removeOnTouchListener, setElementName, setLocalScaleFactor, setOnRenderableLoadCompleteListener, setParentNode, setParentNode, setParentNode, setPosition, setRelativePosition, setRelativePosition, setRotateAlwaysToCamera, setRotateToCameraType, setRotationAngle, setScaleFactor, setShadowCaster, setShadowReceiver, setTransformable, setVisiblity, setWGSCoordinates
-
-
-
-
Constructor Detail
-
ARParticleElement
public ARParticleElement(android.content.Context context)
Construction method- Parameters:
context
-
-
-
Method Detail
-
isRandomSize
public boolean isRandomSize()
Whether the size of the current model is random- Returns:
-
setRandomSize
public void setRandomSize(boolean isRandomSize)
Sets whether you want the size of the current model is random- Parameters:
isRandomSize
-
-
setDiffusivityX
public void setDiffusivityX(float diffusivityX)
Sets the diffusion coefficient of x-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite- Parameters:
diffusivityX
-
-
getDiffusivityX
public float getDiffusivityX()
Gets the diffusion coefficient of x-axis- Returns:
-
setDiffusivityY
public void setDiffusivityY(float diffusivityY)
Sets the diffusion coefficient of y-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite- Parameters:
diffusivityY
-
-
getDiffusivityY
public float getDiffusivityY()
Gets the diffusion coefficient of y-axis- Returns:
-
setDiffusivityZ
public void setDiffusivityZ(float diffusivityZ)
Sets the diffusion coefficient of z-axis Controls the diffusion extent of particle flow. The bigger the value, the bigger the extent The value ranges from 0 to infinite- Parameters:
diffusivityZ
-
-
getDiffusivityZ
public float getDiffusivityZ()
Gets the diffusion coefficient of z-axis- Returns:
-
setGaussian
public void setGaussian(boolean isGaussian)
Sets whether to use Gaussian distribution to produce new position- Parameters:
isGaussian
-
-
isGaussian
public boolean isGaussian()
Whether the model will use Gaussian distribution to produce new position- Returns:
-
setInitRandomDirection
public void setInitRandomDirection(boolean isRandomDirection)
Whether the direction of a single particle is random when initializing it- Parameters:
isRandomDirection
-
-
isInitRandomDirection
public boolean isInitRandomDirection()
The direction of a single particle is random when initializing it- Returns:
-
init
public void init(int count)
Initialize: generating particle collection Generating multiple AR special effect objects. In the meanwhile, changes their positions and rotation angles randomly and saves to the sub object array- Parameters:
count
- the number of particles to be generated
-
createDefaultAnimation
public void createDefaultAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Create particle object default animation- Parameters:
paramter
- AR animation parameter.animationGroupName
- the name of the animation group
-
createTranslatingAnimation
public void createTranslatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Creates particle placement animation- Parameters:
paramter
- The animation parameter.animationGroupName
- the name of the animation group
-
createRotatingAnimation
public void createRotatingAnimation(ARAnimationParameter parameter, java.lang.String animationGroupName)
Creates particle rotation animation- Parameters:
paramter
- AR animation parameter.animationGroupName
- the name of the animation group
-
-